package com.eric.service;
import cn.dev33.satoken.util.SaResult;
import com.eric.domain.dto.EquipmentDto;
import com.eric.domain.po.Equipment;
import com.github.yulichang.base.MPJBaseService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * <p>
 * 设备库存表 服务类
 * </p>
 *
 * @author 新哥
 * @since 2024-03-12
 */
public interface IEquipmentService extends MPJBaseService<Equipment> {

    SaResult saveOneService(EquipmentDto equipmentDto, MultipartFile[] eqPhotoList, HttpServletRequest request);

    SaResult getAllByPageService(Integer current, Integer pageSize);

    SaResult getOneByIdService(Integer id);

//    SaResult getOneByEncodeService(String encode);

    SaResult modifyOneService(EquipmentDto equipmentDto, MultipartFile[] eqPhotoList, HttpServletRequest request, String[] photoList);

    SaResult deleteOneById(Integer id);

//    SaResult getByLocation(Integer current, Integer pageSize, String location);

    SaResult getByTypeName(String typeName, Integer orderBy, Integer current, Integer pageSize);

    SaResult getAllCountsService();

//    void downLoadFileService(String fileName, HttpServletResponse response) throws IOException;

    void downloadFilesService(String[] files, HttpServletResponse response) throws IOException;

    SaResult getByEquipmentNameService(String equipmentName,Integer current,Integer pageSize);

    SaResult getByMultifunctionService(String name, Integer current, Integer pageSize);

    SaResult modifyEquipmentStatusService(Equipment equipment);

    SaResult getCountsByTypeNameService(String typeName);

    SaResult getCountByMultifunctionNameService(String name);
}
